Integrand size = 36, antiderivative size = 198 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {8 \sqrt [4]{-1} a^3 (A-i B) \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )}{d}+\frac {8 a^3 (A-i B) \sqrt {\tan (c+d x)}}{d}+\frac {8 a^3 (i A+B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}-\frac {16 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{315 d}+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{63 d} \]
8*(-1)^(1/4)*a^3*(A-I*B)*arctan((-1)^(3/4)*tan(d*x+c)^(1/2))/d+8*a^3*(A-I* B)*tan(d*x+c)^(1/2)/d+8/3*a^3*(I*A+B)*tan(d*x+c)^(3/2)/d-16/315*a^3*(18*A- 19*I*B)*tan(d*x+c)^(5/2)/d+2/9*I*a*B*tan(d*x+c)^(5/2)*(a+I*a*tan(d*x+c))^2 /d-2/63*(9*A-13*I*B)*tan(d*x+c)^(5/2)*(a^3+I*a^3*tan(d*x+c))/d
Time = 3.18 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.65 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {2 a^3 \left (1260 \sqrt [4]{-1} (A-i B) \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )+\sqrt {\tan (c+d x)} \left (1260 (A-i B)+420 (i A+B) \tan (c+d x)-63 (3 A-4 i B) \tan ^2(c+d x)-45 i (A-3 i B) \tan ^3(c+d x)-35 i B \tan ^4(c+d x)\right )\right )}{315 d} \]
(2*a^3*(1260*(-1)^(1/4)*(A - I*B)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]] + Sqrt[Tan[c + d*x]]*(1260*(A - I*B) + 420*(I*A + B)*Tan[c + d*x] - 63*(3*A - (4*I)*B)*Tan[c + d*x]^2 - (45*I)*(A - (3*I)*B)*Tan[c + d*x]^3 - (35*I)*B *Tan[c + d*x]^4)))/(315*d)
Time = 1.18 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.04, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3042, 4077, 27, 3042, 4077, 27, 3042, 4075, 3042, 4011, 3042, 4011, 3042, 4016, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^{3/2} (a+i a \tan (c+d x))^3 (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4077 |
\(\displaystyle \frac {2}{9} \int \frac {1}{2} \tan ^{\frac {3}{2}}(c+d x) (i \tan (c+d x) a+a)^2 (a (9 A-5 i B)+a (9 i A+13 B) \tan (c+d x))dx+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{9} \int \tan ^{\frac {3}{2}}(c+d x) (i \tan (c+d x) a+a)^2 (a (9 A-5 i B)+a (9 i A+13 B) \tan (c+d x))dx+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{9} \int \tan (c+d x)^{3/2} (i \tan (c+d x) a+a)^2 (a (9 A-5 i B)+a (9 i A+13 B) \tan (c+d x))dx+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 4077 |
\(\displaystyle \frac {1}{9} \left (\frac {2}{7} \int 2 \tan ^{\frac {3}{2}}(c+d x) (i \tan (c+d x) a+a) \left ((27 A-25 i B) a^2+2 (18 i A+19 B) \tan (c+d x) a^2\right )dx-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \int \tan ^{\frac {3}{2}}(c+d x) (i \tan (c+d x) a+a) \left ((27 A-25 i B) a^2+2 (18 i A+19 B) \tan (c+d x) a^2\right )dx-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \int \tan (c+d x)^{3/2} (i \tan (c+d x) a+a) \left ((27 A-25 i B) a^2+2 (18 i A+19 B) \tan (c+d x) a^2\right )dx-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 4075 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \tan ^{\frac {3}{2}}(c+d x) \left (63 (A-i B) a^3+63 (i A+B) \tan (c+d x) a^3\right )dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \tan (c+d x)^{3/2} \left (63 (A-i B) a^3+63 (i A+B) \tan (c+d x) a^3\right )dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \sqrt {\tan (c+d x)} \left (63 a^3 (A-i B) \tan (c+d x)-63 a^3 (i A+B)\right )dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \sqrt {\tan (c+d x)} \left (63 a^3 (A-i B) \tan (c+d x)-63 a^3 (i A+B)\right )dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \frac {-63 (A-i B) a^3-63 (i A+B) \tan (c+d x) a^3}{\sqrt {\tan (c+d x)}}dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}+\frac {126 a^3 (A-i B) \sqrt {\tan (c+d x)}}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\int \frac {-63 (A-i B) a^3-63 (i A+B) \tan (c+d x) a^3}{\sqrt {\tan (c+d x)}}dx-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}+\frac {126 a^3 (A-i B) \sqrt {\tan (c+d x)}}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\frac {7938 a^6 (A-i B)^2 \int \frac {1}{63 a^3 (i A+B) \tan (c+d x)-63 a^3 (A-i B)}d\sqrt {\tan (c+d x)}}{d}-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}+\frac {126 a^3 (A-i B) \sqrt {\tan (c+d x)}}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {1}{9} \left (\frac {4}{7} \left (\frac {126 \sqrt [4]{-1} a^3 (A-i B) \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )}{d}-\frac {4 a^3 (18 A-19 i B) \tan ^{\frac {5}{2}}(c+d x)}{5 d}+\frac {42 a^3 (B+i A) \tan ^{\frac {3}{2}}(c+d x)}{d}+\frac {126 a^3 (A-i B) \sqrt {\tan (c+d x)}}{d}\right )-\frac {2 (9 A-13 i B) \tan ^{\frac {5}{2}}(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{7 d}\right )+\frac {2 i a B \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^2}{9 d}\) |
(((2*I)/9)*a*B*Tan[c + d*x]^(5/2)*(a + I*a*Tan[c + d*x])^2)/d + ((-2*(9*A - (13*I)*B)*Tan[c + d*x]^(5/2)*(a^3 + I*a^3*Tan[c + d*x]))/(7*d) + (4*((12 6*(-1)^(1/4)*a^3*(A - I*B)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]])/d + (126 *a^3*(A - I*B)*Sqrt[Tan[c + d*x]])/d + (42*a^3*(I*A + B)*Tan[c + d*x]^(3/2 ))/d - (4*a^3*(18*A - (19*I)*B)*Tan[c + d*x]^(5/2))/(5*d)))/7)/9
3.2.27.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[B *d*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f* x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && !LeQ[m, -1]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*B*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan [e + f*x])^n*Simp[a*A*d*(m + n) + B*(a*c*(m - 1) - b*d*(n + 1)) - (B*(b*c - a*d)*(m - 1) - d*(A*b + a*B)*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[m, 1] && !LtQ[n, -1]
Time = 0.03 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.51
method | result | size |
derivativedivides | \(\frac {a^{3} \left (-\frac {2 i B \left (\tan ^{\frac {9}{2}}\left (d x +c \right )\right )}{9}-\frac {2 i A \left (\tan ^{\frac {7}{2}}\left (d x +c \right )\right )}{7}-\frac {6 B \left (\tan ^{\frac {7}{2}}\left (d x +c \right )\right )}{7}+\frac {8 i B \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}-\frac {6 A \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}+\frac {8 i A \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}+\frac {8 B \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}-8 i B \left (\sqrt {\tan }\left (d x +c \right )\right )+8 A \left (\sqrt {\tan }\left (d x +c \right )\right )+\frac {\left (4 i B -4 A \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}+\frac {\left (-4 i A -4 B \right ) \sqrt {2}\, \left (\ln \left (\frac {1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}\) | \(299\) |
default | \(\frac {a^{3} \left (-\frac {2 i B \left (\tan ^{\frac {9}{2}}\left (d x +c \right )\right )}{9}-\frac {2 i A \left (\tan ^{\frac {7}{2}}\left (d x +c \right )\right )}{7}-\frac {6 B \left (\tan ^{\frac {7}{2}}\left (d x +c \right )\right )}{7}+\frac {8 i B \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}-\frac {6 A \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}+\frac {8 i A \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}+\frac {8 B \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}-8 i B \left (\sqrt {\tan }\left (d x +c \right )\right )+8 A \left (\sqrt {\tan }\left (d x +c \right )\right )+\frac {\left (4 i B -4 A \right ) \sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}+\frac {\left (-4 i A -4 B \right ) \sqrt {2}\, \left (\ln \left (\frac {1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}\) | \(299\) |
parts | \(\frac {\left (-i A \,a^{3}-3 B \,a^{3}\right ) \left (\frac {2 \left (\tan ^{\frac {7}{2}}\left (d x +c \right )\right )}{7}-\frac {2 \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}+\frac {\sqrt {2}\, \left (\ln \left (\frac {1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}+\frac {\left (3 i A \,a^{3}+B \,a^{3}\right ) \left (\frac {2 \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}-\frac {\sqrt {2}\, \left (\ln \left (\frac {1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}+\frac {\left (3 i B \,a^{3}-3 A \,a^{3}\right ) \left (\frac {2 \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}-2 \left (\sqrt {\tan }\left (d x +c \right )\right )+\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}+\frac {A \,a^{3} \left (2 \left (\sqrt {\tan }\left (d x +c \right )\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}-\frac {i B \,a^{3} \left (\frac {2 \left (\tan ^{\frac {9}{2}}\left (d x +c \right )\right )}{9}-\frac {2 \left (\tan ^{\frac {5}{2}}\left (d x +c \right )\right )}{5}+2 \left (\sqrt {\tan }\left (d x +c \right )\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}{1-\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )+\tan \left (d x +c \right )}\right )+2 \arctan \left (1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )+2 \arctan \left (-1+\sqrt {2}\, \left (\sqrt {\tan }\left (d x +c \right )\right )\right )\right )}{4}\right )}{d}\) | \(593\) |
1/d*a^3*(-2/9*I*B*tan(d*x+c)^(9/2)-2/7*I*A*tan(d*x+c)^(7/2)-6/7*B*tan(d*x+ c)^(7/2)+8/5*I*B*tan(d*x+c)^(5/2)-6/5*A*tan(d*x+c)^(5/2)+8/3*I*A*tan(d*x+c )^(3/2)+8/3*B*tan(d*x+c)^(3/2)-8*I*B*tan(d*x+c)^(1/2)+8*A*tan(d*x+c)^(1/2) +1/4*(4*I*B-4*A)*2^(1/2)*(ln((1+2^(1/2)*tan(d*x+c)^(1/2)+tan(d*x+c))/(1-2^ (1/2)*tan(d*x+c)^(1/2)+tan(d*x+c)))+2*arctan(1+2^(1/2)*tan(d*x+c)^(1/2))+2 *arctan(-1+2^(1/2)*tan(d*x+c)^(1/2)))+1/4*(-4*I*A-4*B)*2^(1/2)*(ln((1-2^(1 /2)*tan(d*x+c)^(1/2)+tan(d*x+c))/(1+2^(1/2)*tan(d*x+c)^(1/2)+tan(d*x+c)))+ 2*arctan(1+2^(1/2)*tan(d*x+c)^(1/2))+2*arctan(-1+2^(1/2)*tan(d*x+c)^(1/2)) ))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 561 vs. \(2 (158) = 316\).
Time = 0.32 (sec) , antiderivative size = 561, normalized size of antiderivative = 2.83 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (315 \, \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {2 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (-i \, A - B\right )} a^{3}}\right ) - 315 \, \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {2 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt {-\frac {{\left (i \, A^{2} + 2 \, A B - i \, B^{2}\right )} a^{6}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (-i \, A - B\right )} a^{3}}\right ) - 2 \, {\left ({\left (957 \, A - 1051 i \, B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} + 5 \, {\left (579 \, A - 547 i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, {\left (171 \, A - 173 i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, {\left (429 \, A - 433 i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + 4 \, {\left (123 \, A - 124 i \, B\right )} a^{3}\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )}}{315 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
-2/315*(315*sqrt(-(I*A^2 + 2*A*B - I*B^2)*a^6/d^2)*(d*e^(8*I*d*x + 8*I*c) + 4*d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) + 4*d*e^(2*I*d*x + 2*I *c) + d)*log(-2*((A - I*B)*a^3*e^(2*I*d*x + 2*I*c) + sqrt(-(I*A^2 + 2*A*B - I*B^2)*a^6/d^2)*(I*d*e^(2*I*d*x + 2*I*c) + I*d)*sqrt((-I*e^(2*I*d*x + 2* I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/((-I*A - B)*a^3 )) - 315*sqrt(-(I*A^2 + 2*A*B - I*B^2)*a^6/d^2)*(d*e^(8*I*d*x + 8*I*c) + 4 *d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) + 4*d*e^(2*I*d*x + 2*I*c) + d)*log(-2*((A - I*B)*a^3*e^(2*I*d*x + 2*I*c) + sqrt(-(I*A^2 + 2*A*B - I *B^2)*a^6/d^2)*(-I*d*e^(2*I*d*x + 2*I*c) - I*d)*sqrt((-I*e^(2*I*d*x + 2*I* c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/((-I*A - B)*a^3)) - 2*((957*A - 1051*I*B)*a^3*e^(8*I*d*x + 8*I*c) + 5*(579*A - 547*I*B)*a^3 *e^(6*I*d*x + 6*I*c) + 21*(171*A - 173*I*B)*a^3*e^(4*I*d*x + 4*I*c) + 5*(4 29*A - 433*I*B)*a^3*e^(2*I*d*x + 2*I*c) + 4*(123*A - 124*I*B)*a^3)*sqrt((- I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1)))/(d*e^(8*I*d*x + 8*I *c) + 4*d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) + 4*d*e^(2*I*d*x + 2*I*c) + d)
\[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=- i a^{3} \left (\int \left (- 3 A \tan ^{\frac {5}{2}}{\left (c + d x \right )}\right )\, dx + \int A \tan ^{\frac {9}{2}}{\left (c + d x \right )}\, dx + \int \left (- 3 B \tan ^{\frac {7}{2}}{\left (c + d x \right )}\right )\, dx + \int B \tan ^{\frac {11}{2}}{\left (c + d x \right )}\, dx + \int i A \tan ^{\frac {3}{2}}{\left (c + d x \right )}\, dx + \int \left (- 3 i A \tan ^{\frac {7}{2}}{\left (c + d x \right )}\right )\, dx + \int i B \tan ^{\frac {5}{2}}{\left (c + d x \right )}\, dx + \int \left (- 3 i B \tan ^{\frac {9}{2}}{\left (c + d x \right )}\right )\, dx\right ) \]
-I*a**3*(Integral(-3*A*tan(c + d*x)**(5/2), x) + Integral(A*tan(c + d*x)** (9/2), x) + Integral(-3*B*tan(c + d*x)**(7/2), x) + Integral(B*tan(c + d*x )**(11/2), x) + Integral(I*A*tan(c + d*x)**(3/2), x) + Integral(-3*I*A*tan (c + d*x)**(7/2), x) + Integral(I*B*tan(c + d*x)**(5/2), x) + Integral(-3* I*B*tan(c + d*x)**(9/2), x))
Time = 0.41 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.18 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {70 i \, B a^{3} \tan \left (d x + c\right )^{\frac {9}{2}} + 90 \, {\left (i \, A + 3 \, B\right )} a^{3} \tan \left (d x + c\right )^{\frac {7}{2}} + 126 \, {\left (3 \, A - 4 i \, B\right )} a^{3} \tan \left (d x + c\right )^{\frac {5}{2}} + 840 \, {\left (-i \, A - B\right )} a^{3} \tan \left (d x + c\right )^{\frac {3}{2}} - 2520 \, {\left (A - i \, B\right )} a^{3} \sqrt {\tan \left (d x + c\right )} + 315 \, {\left (2 \, \sqrt {2} {\left (\left (i + 1\right ) \, A - \left (i - 1\right ) \, B\right )} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + 2 \, \sqrt {\tan \left (d x + c\right )}\right )}\right ) + 2 \, \sqrt {2} {\left (\left (i + 1\right ) \, A - \left (i - 1\right ) \, B\right )} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - 2 \, \sqrt {\tan \left (d x + c\right )}\right )}\right ) - \sqrt {2} {\left (\left (i - 1\right ) \, A + \left (i + 1\right ) \, B\right )} \log \left (\sqrt {2} \sqrt {\tan \left (d x + c\right )} + \tan \left (d x + c\right ) + 1\right ) + \sqrt {2} {\left (\left (i - 1\right ) \, A + \left (i + 1\right ) \, B\right )} \log \left (-\sqrt {2} \sqrt {\tan \left (d x + c\right )} + \tan \left (d x + c\right ) + 1\right )\right )} a^{3}}{315 \, d} \]
-1/315*(70*I*B*a^3*tan(d*x + c)^(9/2) + 90*(I*A + 3*B)*a^3*tan(d*x + c)^(7 /2) + 126*(3*A - 4*I*B)*a^3*tan(d*x + c)^(5/2) + 840*(-I*A - B)*a^3*tan(d* x + c)^(3/2) - 2520*(A - I*B)*a^3*sqrt(tan(d*x + c)) + 315*(2*sqrt(2)*((I + 1)*A - (I - 1)*B)*arctan(1/2*sqrt(2)*(sqrt(2) + 2*sqrt(tan(d*x + c)))) + 2*sqrt(2)*((I + 1)*A - (I - 1)*B)*arctan(-1/2*sqrt(2)*(sqrt(2) - 2*sqrt(t an(d*x + c)))) - sqrt(2)*((I - 1)*A + (I + 1)*B)*log(sqrt(2)*sqrt(tan(d*x + c)) + tan(d*x + c) + 1) + sqrt(2)*((I - 1)*A + (I + 1)*B)*log(-sqrt(2)*s qrt(tan(d*x + c)) + tan(d*x + c) + 1))*a^3)/d
Time = 1.11 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.98 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {\left (4 i - 4\right ) \, \sqrt {2} {\left (i \, A a^{3} + B a^{3}\right )} \arctan \left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right )}{d} - \frac {2 \, {\left (35 i \, B a^{3} d^{8} \tan \left (d x + c\right )^{\frac {9}{2}} + 45 i \, A a^{3} d^{8} \tan \left (d x + c\right )^{\frac {7}{2}} + 135 \, B a^{3} d^{8} \tan \left (d x + c\right )^{\frac {7}{2}} + 189 \, A a^{3} d^{8} \tan \left (d x + c\right )^{\frac {5}{2}} - 252 i \, B a^{3} d^{8} \tan \left (d x + c\right )^{\frac {5}{2}} - 420 i \, A a^{3} d^{8} \tan \left (d x + c\right )^{\frac {3}{2}} - 420 \, B a^{3} d^{8} \tan \left (d x + c\right )^{\frac {3}{2}} - 1260 \, A a^{3} d^{8} \sqrt {\tan \left (d x + c\right )} + 1260 i \, B a^{3} d^{8} \sqrt {\tan \left (d x + c\right )}\right )}}{315 \, d^{9}} \]
(4*I - 4)*sqrt(2)*(I*A*a^3 + B*a^3)*arctan(-(1/2*I - 1/2)*sqrt(2)*sqrt(tan (d*x + c)))/d - 2/315*(35*I*B*a^3*d^8*tan(d*x + c)^(9/2) + 45*I*A*a^3*d^8* tan(d*x + c)^(7/2) + 135*B*a^3*d^8*tan(d*x + c)^(7/2) + 189*A*a^3*d^8*tan( d*x + c)^(5/2) - 252*I*B*a^3*d^8*tan(d*x + c)^(5/2) - 420*I*A*a^3*d^8*tan( d*x + c)^(3/2) - 420*B*a^3*d^8*tan(d*x + c)^(3/2) - 1260*A*a^3*d^8*sqrt(ta n(d*x + c)) + 1260*I*B*a^3*d^8*sqrt(tan(d*x + c)))/d^9
Time = 13.58 (sec) , antiderivative size = 327, normalized size of antiderivative = 1.65 \[ \int \tan ^{\frac {3}{2}}(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {8\,A\,a^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}}{d}+\frac {A\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{3/2}\,8{}\mathrm {i}}{3\,d}-\frac {6\,A\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{5/2}}{5\,d}-\frac {A\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{7/2}\,2{}\mathrm {i}}{7\,d}-\frac {B\,a^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,8{}\mathrm {i}}{d}+\frac {8\,B\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{3/2}}{3\,d}+\frac {B\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{5/2}\,8{}\mathrm {i}}{5\,d}-\frac {6\,B\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{7/2}}{7\,d}-\frac {B\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^{9/2}\,2{}\mathrm {i}}{9\,d}+\frac {\sqrt {2}\,A\,a^3\,\ln \left (-A\,a^3\,d\,8{}\mathrm {i}+\sqrt {2}\,A\,a^3\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\left (-4+4{}\mathrm {i}\right )\right )\,\left (2-2{}\mathrm {i}\right )}{d}-\frac {\sqrt {-16{}\mathrm {i}}\,A\,a^3\,\ln \left (-A\,a^3\,d\,8{}\mathrm {i}+2\,\sqrt {-16{}\mathrm {i}}\,A\,a^3\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\right )}{d}+\frac {\sqrt {2}\,B\,a^3\,\ln \left (-8\,B\,a^3\,d+\sqrt {2}\,B\,a^3\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\left (-4-4{}\mathrm {i}\right )\right )\,\left (2+2{}\mathrm {i}\right )}{d}-\frac {\sqrt {16{}\mathrm {i}}\,B\,a^3\,\ln \left (-8\,B\,a^3\,d+2\,\sqrt {16{}\mathrm {i}}\,B\,a^3\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\right )}{d} \]
(8*A*a^3*tan(c + d*x)^(1/2))/d + (A*a^3*tan(c + d*x)^(3/2)*8i)/(3*d) - (6* A*a^3*tan(c + d*x)^(5/2))/(5*d) - (A*a^3*tan(c + d*x)^(7/2)*2i)/(7*d) - (B *a^3*tan(c + d*x)^(1/2)*8i)/d + (8*B*a^3*tan(c + d*x)^(3/2))/(3*d) + (B*a^ 3*tan(c + d*x)^(5/2)*8i)/(5*d) - (6*B*a^3*tan(c + d*x)^(7/2))/(7*d) - (B*a ^3*tan(c + d*x)^(9/2)*2i)/(9*d) + (2^(1/2)*A*a^3*log(- A*a^3*d*8i - 2^(1/2 )*A*a^3*d*tan(c + d*x)^(1/2)*(4 - 4i))*(2 - 2i))/d - ((-16i)^(1/2)*A*a^3*l og(2*(-16i)^(1/2)*A*a^3*d*tan(c + d*x)^(1/2) - A*a^3*d*8i))/d + (2^(1/2)*B *a^3*log(- 8*B*a^3*d - 2^(1/2)*B*a^3*d*tan(c + d*x)^(1/2)*(4 + 4i))*(2 + 2 i))/d - (16i^(1/2)*B*a^3*log(2*16i^(1/2)*B*a^3*d*tan(c + d*x)^(1/2) - 8*B* a^3*d))/d